﻿// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc.
using System;
using static Kbg.NppPluginNET.PluginInfrastructure.Win32;

namespace Kbg.NppPluginNET.PluginInfrastructure
{

    /// <summary>
    /// This it the plugin-writers primary interface to Notepad++/Scintilla.
    /// It takes away all the complexity with command numbers and Int-pointer casting.
    ///
    /// See http://www.scintilla.org/ScintillaDoc.html for further details.
    /// </summary>
    public interface IScintillaGateway
    {
        /// <summary>
        /// Change the Scintilla window handle for this Gateway
        /// and return the previous handle for potentially final updates.
        /// </summary>
        /// <param name="newHandle"></param>
        /// <returns></returns>
        IntPtr SetScintillaHandle(IntPtr newHandle);

        /// <summary>
        /// Switch the handle between main and second window handle.
        /// </summary>
        void SwitchScintillaHandle();

        /// <summary>
        /// Return the current Scintilla window handle
        /// </summary>
        /// <returns></returns>
        IntPtr GetScintillaHandle();

        IntPtr CurrentBufferID { get; set; }

        int GetSelectionLength();
        void AppendTextAndMoveCursor(string text);
        void InsertTextAndMoveCursor(string text);
        void SelectCurrentLine();
        void ClearSelectionToCursor();

        /// <summary>
        /// Get the current line from the current position
        /// </summary>
        int GetCurrentLineNumber();

        /// <summary>
        /// Get the scroll information for the current Scintilla window.
        /// </summary>
        /// <param name="mask">Arguments for the scroll information such as tracking</param>
        /// <param name="scrollBar">Which scroll bar information are you looking for</param>
        /// <returns>A ScrollInfo struct with information of the current scroll state</returns>
        ScrollInfo GetScrollInfo(ScrollInfoMask mask = ScrollInfoMask.SIF_ALL, ScrollInfoBar scrollBar = ScrollInfoBar.SB_BOTH);

        /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */
        /// <summary>Add text to the document at current position. (Scintilla feature 2001)</summary>
        unsafe void AddText(int length, string text);

        /// <summary>Add array of cells to document. (Scintilla feature 2002)</summary>
        unsafe void AddStyledText(int length, Cells c);

        /// <summary>Insert string at a position. (Scintilla feature 2003)</summary>
        unsafe void InsertText(Position pos, string text);

        /// <summary>Change the text that is being inserted in response to SC_MOD_INSERTCHECK (Scintilla feature 2672)</summary>
        unsafe void ChangeInsertion(int length, string text);

        /// <summary>Delete all text in the document. (Scintilla feature 2004)</summary>
        void ClearAll();

        /// <summary>Delete a range of text in the document. (Scintilla feature 2645)</summary>
        void DeleteRange(Position pos, int deleteLength);

        /// <summary>Set all style bytes to 0, remove all folding information. (Scintilla feature 2005)</summary>
        void ClearDocumentStyle();

        /// <summary>Returns the number of bytes in the document. (Scintilla feature 2006)</summary>
        int GetLength();

        /// <summary>Returns the character byte at the position. (Scintilla feature 2007)</summary>
        int GetCharAt(Position pos);

        /// <summary>Returns the position of the caret. (Scintilla feature 2008)</summary>
        Position GetCurrentPos();

        /// <summary>Returns the position of the opposite end of the selection to the caret. (Scintilla feature 2009)</summary>
        Position GetAnchor();

        /// <summary>Returns the style byte at the position. (Scintilla feature 2010)</summary>
        int GetStyleAt(Position pos);

        /// <summary>Redoes the next action on the undo history. (Scintilla feature 2011)</summary>
        void Redo();

        /// <summary>
        /// Choose between collecting actions into the undo
        /// history and discarding them.
        /// (Scintilla feature 2012)
        /// </summary>
        void SetUndoCollection(bool collectUndo);

        /// <summary>Select all the text in the document. (Scintilla feature 2013)</summary>
        void SelectAll();

        /// <summary>
        /// Remember the current position in the undo history as the position
        /// at which the document was saved.
        /// (Scintilla feature 2014)
        /// </summary>
        void SetSavePoint();

        /// <summary>
        /// Retrieve a buffer of cells.
        /// Returns the number of bytes in the buffer not including terminating NULs.
        /// (Scintilla feature 2015)
        /// </summary>
        int GetStyledText(TextRange tr);

        /// <summary>Are there any redoable actions in the undo history? (Scintilla feature 2016)</summary>
        bool CanRedo();

        /// <summary>Retrieve the line number at which a particular marker is located. (Scintilla feature 2017)</summary>
        int MarkerLineFromHandle(int handle);

        /// <summary>Delete a marker. (Scintilla feature 2018)</summary>
        void MarkerDeleteHandle(int handle);

        /// <summary>Is undo history being collected? (Scintilla feature 2019)</summary>
        bool GetUndoCollection();

        /// <summary>
        /// Are white space characters currently visible?
        /// Returns one of SCWS_* constants.
        /// (Scintilla feature 2020)
        /// </summary>
        int GetViewWS();

        /// <summary>Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature 2021)</summary>
        void SetViewWS(int viewWS);

        /// <summary>Find the position from a point within the window. (Scintilla feature 2022)</summary>
        Position PositionFromPoint(int x, int y);

        /// <summary>
        /// Find the position from a point within the window but return
        /// INVALID_POSITION if not close to text.
        /// (Scintilla feature 2023)
        /// </summary>
        Position PositionFromPointClose(int x, int y);

        /// <summary>Set caret to start of a line and ensure it is visible. (Scintilla feature 2024)</summary>
        void GotoLine(int line);

        /// <summary>Set caret to a position and ensure it is visible. (Scintilla feature 2025)</summary>
        void GotoPos(Position pos);

        /// <summary>
        /// Set the selection anchor to a position. The anchor is the opposite
        /// end of the selection from the caret.
        /// (Scintilla feature 2026)
        /// </summary>
        void SetAnchor(Position posAnchor);

        /// <summary>
        /// Retrieve the text of the line containing the caret.
        /// Returns the index of the caret on the line.
        /// Result is NUL-terminated.
        /// (Scintilla feature 2027)
        /// </summary>
        unsafe string GetCurLine(int length);

        /// <summary>Retrieve the position of the last correctly styled character. (Scintilla feature 2028)</summary>
        Position GetEndStyled();

        /// <summary>Convert all line endings in the document to one mode. (Scintilla feature 2029)</summary>
        void ConvertEOLs(int eolMode);

        /// <summary>Retrieve the current end of line mode - one of CRLF, CR, or LF. (Scintilla feature 2030)</summary>
        int GetEOLMode();

        /// <summary>Set the current end of line mode. (Scintilla feature 2031)</summary>
        void SetEOLMode(int eolMode);

        /// <summary>
        /// Set the current styling position to pos and the styling mask to mask.
        /// The styling mask can be used to protect some bits in each styling byte from modification.
        /// (Scintilla feature 2032)
        /// </summary>
        void StartStyling(Position pos, int mask);

        /// <summary>
        /// Change style from current styling position for length characters to a style
        /// and move the current styling position to after this newly styled segment.
        /// (Scintilla feature 2033)
        /// </summary>
        void SetStyling(int length, int style);

        /// <summary>Is drawing done first into a buffer or direct to the screen? (Scintilla feature 2034)</summary>
        bool GetBufferedDraw();

        /// <summary>
        /// If drawing is buffered then each line of text is drawn into a bitmap buffer
        /// before drawing it to the screen to avoid flicker.
        /// (Scintilla feature 2035)
        /// </summary>
        void SetBufferedDraw(bool buffered);

        /// <summary>Change the visible size of a tab to be a multiple of the width of a space character. (Scintilla feature 2036)</summary>
        void SetTabWidth(int tabWidth);

        /// <summary>Retrieve the visible size of a tab. (Scintilla feature 2121)</summary>
        int GetTabWidth();

        /// <summary>Clear explicit tabstops on a line. (Scintilla feature 2675)</summary>
        void ClearTabStops(int line);

        /// <summary>Add an explicit tab stop for a line. (Scintilla feature 2676)</summary>
        void AddTabStop(int line, int x);

        /// <summary>Find the next explicit tab stop position on a line after a position. (Scintilla feature 2677)</summary>
        int GetNextTabStop(int line, int x);

        /// <summary>
        /// Set the code page used to interpret the bytes of the document as characters.
        /// The SC_CP_UTF8 value can be used to enter Unicode mode.
        /// (Scintilla feature 2037)
        /// </summary>
        void SetCodePage(int codePage);

        /// <summary>Is the IME displayed in a winow or inline? (Scintilla feature 2678)</summary>
        int GetIMEInteraction();

        /// <summary>Choose to display the the IME in a winow or inline. (Scintilla feature 2679)</summary>
        void SetIMEInteraction(int imeInteraction);

        /// <summary>Set the symbol used for a particular marker number. (Scintilla feature 2040)</summary>
        void MarkerDefine(int markerNumber, int markerSymbol);

        /// <summary>Set the foreground colour used for a particular marker number. (Scintilla feature 2041)</summary>
        void MarkerSetFore(int markerNumber, Colour fore);

        /// <summary>Set the background colour used for a particular marker number. (Scintilla feature 2042)</summary>
        void MarkerSetBack(int markerNumber, Colour back);

        /// <summary>Set the background colour used for a particular marker number when its folding block is selected. (Scintilla feature 2292)</summary>
        void MarkerSetBackSelected(int markerNumber, Colour back);

        /// <summary>Enable/disable highlight for current folding bloc (smallest one that contains the caret) (Scintilla feature 2293)</summary>
        void MarkerEnableHighlight(bool enabled);

        /// <summary>Add a marker to a line, returning an ID which can be used to find or delete the marker. (Scintilla feature 2043)</summary>
        int MarkerAdd(int line, int markerNumber);

        /// <summary>Delete a marker from a line. (Scintilla feature 2044)</summary>
        void MarkerDelete(int line, int markerNumber);

        /// <summary>Delete all markers with a particular number from all lines. (Scintilla feature 2045)</summary>
        void MarkerDeleteAll(int markerNumber);

        /// <summary>Get a bit mask of all the markers set on a line. (Scintilla feature 2046)</summary>
        int MarkerGet(int line);

        /// <summary>
        /// Find the next line at or after lineStart that includes a marker in mask.
        /// Return -1 when no more lines.
        /// (Scintilla feature 2047)
        /// </summary>
        int MarkerNext(int lineStart, int markerMask);

        /// <summary>Find the previous line before lineStart that includes a marker in mask. (Scintilla feature 2048)</summary>
        int MarkerPrevious(int lineStart, int markerMask);

        /// <summary>Define a marker from a pixmap. (Scintilla feature 2049)</summary>
        unsafe void MarkerDefinePixmap(int markerNumber, string pixmap);

        /// <summary>Add a set of markers to a line. (Scintilla feature 2466)</summary>
        void MarkerAddSet(int line, int set);

        /// <summary>Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature 2476)</summary>
        void MarkerSetAlpha(int markerNumber, int alpha);

        /// <summary>Set a margin to be either numeric or symbolic. (Scintilla feature 2240)</summary>
        void SetMarginTypeN(int margin, int marginType);

        /// <summary>Retrieve the type of a margin. (Scintilla feature 2241)</summary>
        int GetMarginTypeN(int margin);

        /// <summary>Set the width of a margin to a width expressed in pixels. (Scintilla feature 2242)</summary>
        void SetMarginWidthN(int margin, int pixelWidth);

        /// <summary>Retrieve the width of a margin in pixels. (Scintilla feature 2243)</summary>
        int GetMarginWidthN(int margin);

        /// <summary>Set a mask that determines which markers are displayed in a margin. (Scintilla feature 2244)</summary>
        void SetMarginMaskN(int margin, int mask);

        /// <summary>Retrieve the marker mask of a margin. (Scintilla feature 2245)</summary>
        int GetMarginMaskN(int margin);

        /// <summary>Make a margin sensitive or insensitive to mouse clicks. (Scintilla feature 2246)</summary>
        void SetMarginSensitiveN(int margin, bool sensitive);

        /// <summary>Retrieve the mouse click sensitivity of a margin. (Scintilla feature 2247)</summary>
        bool GetMarginSensitiveN(int margin);

        /// <summary>Set the cursor shown when the mouse is inside a margin. (Scintilla feature 2248)</summary>
        void SetMarginCursorN(int margin, int cursor);

        /// <summary>Retrieve the cursor shown in a margin. (Scintilla feature 2249)</summary>
        int GetMarginCursorN(int margin);

        /// <summary>Clear all the styles and make equivalent to the global default style. (Scintilla feature 2050)</summary>
        void StyleClearAll();

        /// <summary>Set the foreground colour of a style. (Scintilla feature 2051)</summary>
        void StyleSetFore(int style, Colour fore);

        /// <summary>Set the background colour of a style. (Scintilla feature 2052)</summary>
        void StyleSetBack(int style, Colour back);

        /// <summary>Set a style to be bold or not. (Scintilla feature 2053)</summary>
        void StyleSetBold(int style, bool bold);

        /// <summary>Set a style to be italic or not. (Scintilla feature 2054)</summary>
        void StyleSetItalic(int style, bool italic);

        /// <summary>Set the size of characters of a style. (Scintilla feature 2055)</summary>
        void StyleSetSize(int style, int sizePoints);

        /// <summary>Set the font of a style. (Scintilla feature 2056)</summary>
        unsafe void StyleSetFont(int style, string fontName);

        /// <summary>Set a style to have its end of line filled or not. (Scintilla feature 2057)</summary>
        void StyleSetEOLFilled(int style, bool filled);

        /// <summary>Reset the default style to its state at startup (Scintilla feature 2058)</summary>
        void StyleResetDefault();

        /// <summary>Set a style to be underlined or not. (Scintilla feature 2059)</summary>
        void StyleSetUnderline(int style, bool underline);

        /// <summary>Get the foreground colour of a style. (Scintilla feature 2481)</summary>
        Colour StyleGetFore(int style);

        /// <summary>Get the background colour of a style. (Scintilla feature 2482)</summary>
        Colour StyleGetBack(int style);

        /// <summary>Get is a style bold or not. (Scintilla feature 2483)</summary>
        bool StyleGetBold(int style);

        /// <summary>Get is a style italic or not. (Scintilla feature 2484)</summary>
        bool StyleGetItalic(int style);

        /// <summary>Get the size of characters of a style. (Scintilla feature 2485)</summary>
        int StyleGetSize(int style);

        /// <summary>
        /// Get the font of a style.
        /// Returns the length of the fontName
        /// Result is NUL-terminated.
        /// (Scintilla feature 2486)
        /// </summary>
        unsafe string StyleGetFont(int style);

        /// <summary>Get is a style to have its end of line filled or not. (Scintilla feature 2487)</summary>
        bool StyleGetEOLFilled(int style);

        /// <summary>Get is a style underlined or not. (Scintilla feature 2488)</summary>
        bool StyleGetUnderline(int style);

        /// <summary>Get is a style mixed case, or to force upper or lower case. (Scintilla feature 2489)</summary>
        int StyleGetCase(int style);

        /// <summary>Get the character get of the font in a style. (Scintilla feature 2490)</summary>
        int StyleGetCharacterSet(int style);

        /// <summary>Get is a style visible or not. (Scintilla feature 2491)</summary>
        bool StyleGetVisible(int style);

        /// <summary>
        /// Get is a style changeable or not (read only).
        /// Experimental feature, currently buggy.
        /// (Scintilla feature 2492)
        /// </summary>
        bool StyleGetChangeable(int style);

        /// <summary>Get is a style a hotspot or not. (Scintilla feature 2493)</summary>
        bool StyleGetHotSpot(int style);

        /// <summary>Set a style to be mixed case, or to force upper or lower case. (Scintilla feature 2060)</summary>
        void StyleSetCase(int style, int caseForce);

        /// <summary>Set the size of characters of a style. Size is in points multiplied by 100. (Scintilla feature 2061)</summary>
        void StyleSetSizeFractional(int style, int caseForce);

        /// <summary>Get the size of characters of a style in points multiplied by 100 (Scintilla feature 2062)</summary>
        int StyleGetSizeFractional(int style);

        /// <summary>Set the weight of characters of a style. (Scintilla feature 2063)</summary>
        void StyleSetWeight(int style, int weight);

        /// <summary>Get the weight of characters of a style. (Scintilla feature 2064)</summary>
        int StyleGetWeight(int style);

        /// <summary>Set the character set of the font in a style. (Scintilla feature 2066)</summary>
        void StyleSetCharacterSet(int style, int characterSet);

        /// <summary>Set a style to be a hotspot or not. (Scintilla feature 2409)</summary>
        void StyleSetHotSpot(int style, bool hotspot);

        /// <summary>Set the foreground colour of the main and additional selections and whether to use this setting. (Scintilla feature 2067)</summary>
        void SetSelFore(bool useSetting, Colour fore);

        /// <summary>Set the background colour of the main and additional selections and whether to use this setting. (Scintilla feature 2068)</summary>
        void SetSelBack(bool useSetting, Colour back);

        /// <summary>Get the alpha of the selection. (Scintilla feature 2477)</summary>
        int GetSelAlpha();

        /// <summary>Set the alpha of the selection. (Scintilla feature 2478)</summary>
        void SetSelAlpha(int alpha);

        /// <summary>Is the selection end of line filled? (Scintilla feature 2479)</summary>
        bool GetSelEOLFilled();

        /// <summary>Set the selection to have its end of line filled or not. (Scintilla feature 2480)</summary>
        void SetSelEOLFilled(bool filled);

        /// <summary>Set the foreground colour of the caret. (Scintilla feature 2069)</summary>
        void SetCaretFore(Colour fore);

        /// <summary>When key+modifier combination km is pressed perform msg. (Scintilla feature 2070)</summary>
        void AssignCmdKey(KeyModifier km, int msg);

        /// <summary>When key+modifier combination km is pressed do nothing. (Scintilla feature 2071)</summary>
        void ClearCmdKey(KeyModifier km);

        /// <summary>Drop all key mappings. (Scintilla feature 2072)</summary>
        void ClearAllCmdKeys();

        /// <summary>Set the styles for a segment of the document. (Scintilla feature 2073)</summary>
        unsafe void SetStylingEx(int length, string styles);

        /// <summary>Set a style to be visible or not. (Scintilla feature 2074)</summary>
        void StyleSetVisible(int style, bool visible);

        /// <summary>Get the time in milliseconds that the caret is on and off. (Scintilla feature 2075)</summary>
        int GetCaretPeriod();

        /// <summary>Get the time in milliseconds that the caret is on and off. 0 = steady on. (Scintilla feature 2076)</summary>
        void SetCaretPeriod(int periodMilliseconds);

        /// <summary>
        /// Set the set of characters making up words for when moving or selecting by word.
        /// First sets defaults like SetCharsDefault.
        /// (Scintilla feature 2077)
        /// </summary>
        unsafe void SetWordChars(string characters);

        /// <summary>
        /// Get the set of characters making up words for when moving or selecting by word.
        /// Returns the number of characters
        /// (Scintilla feature 2646)
        /// </summary>
        unsafe string GetWordChars();

        /// <summary>
        /// Start a sequence of actions that is undone and redone as a unit.
        /// May be nested.
        /// (Scintilla feature 2078)
        /// </summary>
        void BeginUndoAction();

        /// <summary>End a sequence of actions that is undone and redone as a unit. (Scintilla feature 2079)</summary>
        void EndUndoAction();

        /// <summary>Set an indicator to plain, squiggle or TT. (Scintilla feature 2080)</summary>
        void IndicSetStyle(int indic, int style);

        /// <summary>Retrieve the style of an indicator. (Scintilla feature 2081)</summary>
        int IndicGetStyle(int indic);

        /// <summary>Set the foreground colour of an indicator. (Scintilla feature 2082)</summary>
        void IndicSetFore(int indic, Colour fore);

        /// <summary>Retrieve the foreground colour of an indicator. (Scintilla feature 2083)</summary>
        Colour IndicGetFore(int indic);

        /// <summary>Set an indicator to draw under text or over(default). (Scintilla feature 2510)</summary>
        void IndicSetUnder(int indic, bool under);

        /// <summary>Retrieve whether indicator drawn under or over text. (Scintilla feature 2511)</summary>
        bool IndicGetUnder(int indic);

        /// <summary>Set a hover indicator to plain, squiggle or TT. (Scintilla feature 2680)</summary>
        void IndicSetHoverStyle(int indic, int style);

        /// <summary>Retrieve the hover style of an indicator. (Scintilla feature 2681)</summary>
        int IndicGetHoverStyle(int indic);

        /// <summary>Set the foreground hover colour of an indicator. (Scintilla feature 2682)</summary>
        void IndicSetHoverFore(int indic, Colour fore);

        /// <summary>Retrieve the foreground hover colour of an indicator. (Scintilla feature 2683)</summary>
        Colour IndicGetHoverFore(int indic);

        /// <summary>Set the attributes of an indicator. (Scintilla feature 2684)</summary>
        void IndicSetFlags(int indic, int flags);

        /// <summary>Retrieve the attributes of an indicator. (Scintilla feature 2685)</summary>
        int IndicGetFlags(int indic);

        /// <summary>Set the foreground colour of all whitespace and whether to use this setting. (Scintilla feature 2084)</summary>
        void SetWhitespaceFore(bool useSetting, Colour fore);

        /// <summary>Set the background colour of all whitespace and whether to use this setting. (Scintilla feature 2085)</summary>
        void SetWhitespaceBack(bool useSetting, Colour back);

        /// <summary>Set the size of the dots used to mark space characters. (Scintilla feature 2086)</summary>
        void SetWhitespaceSize(int size);

        /// <summary>Get the size of the dots used to mark space characters. (Scintilla feature 2087)</summary>
        int GetWhitespaceSize();

        /// <summary>
        /// Divide each styling byte into lexical class bits (default: 5) and indicator
        /// bits (default: 3). If a lexer requires more than 32 lexical states, then this
        /// is used to expand the possible states.
        /// (Scintilla feature 2090)
        /// </summary>
        void SetStyleBits(int bits);

        /// <summary>Retrieve number of bits in style bytes used to hold the lexical state. (Scintilla feature 2091)</summary>
        int GetStyleBits();

        /// <summary>Used to hold extra styling information for each line. (Scintilla feature 2092)</summary>
        void SetLineState(int line, int state);

        /// <summary>Retrieve the extra styling information for a line. (Scintilla feature 2093)</summary>
        int GetLineState(int line);

        /// <summary>Retrieve the last line number that has line state. (Scintilla feature 2094)</summary>
        int GetMaxLineState();

        /// <summary>Is the background of the line containing the caret in a different colour? (Scintilla feature 2095)</summary>
        bool GetCaretLineVisible();

        /// <summary>Display the background of the line containing the caret in a different colour. (Scintilla feature 2096)</summary>
        void SetCaretLineVisible(bool show);

        /// <summary>Get the colour of the background of the line containing the caret. (Scintilla feature 2097)</summary>
        Colour GetCaretLineBack();

        /// <summary>Set the colour of the background of the line containing the caret. (Scintilla feature 2098)</summary>
        void SetCaretLineBack(Colour back);

        /// <summary>
        /// Set a style to be changeable or not (read only).
        /// Experimental feature, currently buggy.
        /// (Scintilla feature 2099)
        /// </summary>
        void StyleSetChangeable(int style, bool changeable);

        /// <summary>
        /// Display a auto-completion list.
        /// The lenEntered parameter indicates how many characters before
        /// the caret should be used to provide context.
        /// (Scintilla feature 2100)
        /// </summary>
        unsafe void AutoCShow(int lenEntered, string itemList);

        /// <summary>Remove the auto-completion list from the screen. (Scintilla feature 2101)</summary>
        void AutoCCancel();

        /// <summary>Is there an auto-completion list visible? (Scintilla feature 2102)</summary>
        bool AutoCActive();

        /// <summary>Retrieve the position of the caret when the auto-completion list was displayed. (Scintilla feature 2103)</summary>
        Position AutoCPosStart();

        /// <summary>User has selected an item so remove the list and insert the selection. (Scintilla feature 2104)</summary>
        void AutoCComplete();

        /// <summary>Define a set of character that when typed cancel the auto-completion list. (Scintilla feature 2105)</summary>
        unsafe void AutoCStops(string characterSet);

        /// <summary>
        /// Change the separator character in the string setting up an auto-completion list.
        /// Default is space but can be changed if items contain space.
        /// (Scintilla feature 2106)
        /// </summary>
        void AutoCSetSeparator(int separatorCharacter);

        /// <summary>Retrieve the auto-completion list separator character. (Scintilla feature 2107)</summary>
        int AutoCGetSeparator();

        /// <summary>Select the item in the auto-completion list that starts with a string. (Scintilla feature 2108)</summary>
        unsafe void AutoCSelect(string text);

        /// <summary>
        /// Should the auto-completion list be cancelled if the user backspaces to a
        /// position before where the box was created.
        /// (Scintilla feature 2110)
        /// </summary>
        void AutoCSetCancelAtStart(bool cancel);

        /// <summary>Retrieve whether auto-completion cancelled by backspacing before start. (Scintilla feature 2111)</summary>
        bool AutoCGetCancelAtStart();

        /// <summary>
        /// Define a set of characters that when typed will cause the autocompletion to
        /// choose the selected item.
        /// (Scintilla feature 2112)
        /// </summary>
        unsafe void AutoCSetFillUps(string characterSet);

        /// <summary>Should a single item auto-completion list automatically choose the item. (Scintilla feature 2113)</summary>
        void AutoCSetChooseSingle(bool chooseSingle);

        /// <summary>Retrieve whether a single item auto-completion list automatically choose the item. (Scintilla feature 2114)</summary>
        bool AutoCGetChooseSingle();

        /// <summary>Set whether case is significant when performing auto-completion searches. (Scintilla feature 2115)</summary>
        void AutoCSetIgnoreCase(bool ignoreCase);

        /// <summary>Retrieve state of ignore case flag. (Scintilla feature 2116)</summary>
        bool AutoCGetIgnoreCase();

        /// <summary>Display a list of strings and send notification when user chooses one. (Scintilla feature 2117)</summary>
        unsafe void UserListShow(int listType, string itemList);

        /// <summary>Set whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2118)</summary>
        void AutoCSetAutoHide(bool autoHide);

        /// <summary>Retrieve whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2119)</summary>
        bool AutoCGetAutoHide();

        /// <summary>
        /// Set whether or not autocompletion deletes any word characters
        /// after the inserted text upon completion.
        /// (Scintilla feature 2270)
        /// </summary>
        void AutoCSetDropRestOfWord(bool dropRestOfWord);

        /// <summary>
        /// Retrieve whether or not autocompletion deletes any word characters
        /// after the inserted text upon completion.
        /// (Scintilla feature 2271)
        /// </summary>
        bool AutoCGetDropRestOfWord();

        /// <summary>Register an XPM image for use in autocompletion lists. (Scintilla feature 2405)</summary>
        unsafe void RegisterImage(int type, string xpmData);

        /// <summary>Clear all the registered XPM images. (Scintilla feature 2408)</summary>
        void ClearRegisteredImages();

        /// <summary>Retrieve the auto-completion list type-separator character. (Scintilla feature 2285)</summary>
        int AutoCGetTypeSeparator();

        /// <summary>
        /// Change the type-separator character in the string setting up an auto-completion list.
        /// Default is '?' but can be changed if items contain '?'.
        /// (Scintilla feature 2286)
        /// </summary>
        void AutoCSetTypeSeparator(int separatorCharacter);

        /// <summary>
        /// Set the maximum width, in characters, of auto-completion and user lists.
        /// Set to 0 to autosize to fit longest item, which is the default.
        /// (Scintilla feature 2208)
        /// </summary>
        void AutoCSetMaxWidth(int characterCount);

        /// <summary>Get the maximum width, in characters, of auto-completion and user lists. (Scintilla feature 2209)</summary>
        int AutoCGetMaxWidth();

        /// <summary>
        /// Set the maximum height, in rows, of auto-completion and user lists.
        /// The default is 5 rows.
        /// (Scintilla feature 2210)
        /// </summary>
        void AutoCSetMaxHeight(int rowCount);

        /// <summary>Set the maximum height, in rows, of auto-completion and user lists. (Scintilla feature 2211)</summary>
        int AutoCGetMaxHeight();

        /// <summary>Set the number of spaces used for one level of indentation. (Scintilla feature 2122)</summary>
        void SetIndent(int indentSize);

        /// <summary>Retrieve indentation size. (Scintilla feature 2123)</summary>
        int GetIndent();

        /// <summary>
        /// Indentation will only use space characters if useTabs is false, otherwise
        /// it will use a combination of tabs and spaces.
        /// (Scintilla feature 2124)
        /// </summary>
        void SetUseTabs(bool useTabs);

        /// <summary>Retrieve whether tabs will be used in indentation. (Scintilla feature 2125)</summary>
        bool GetUseTabs();

        /// <summary>Change the indentation of a line to a number of columns. (Scintilla feature 2126)</summary>
        void SetLineIndentation(int line, int indentSize);

        /// <summary>Retrieve the number of columns that a line is indented. (Scintilla feature 2127)</summary>
        int GetLineIndentation(int line);

        /// <summary>Retrieve the position before the first non indentation character on a line. (Scintilla feature 2128)</summary>
        Position GetLineIndentPosition(int line);

        /// <summary>Retrieve the column number of a position, taking tab width into account. (Scintilla feature 2129)</summary>
        int GetColumn(Position pos);

        /// <summary>Count characters between two positions. (Scintilla feature 2633)</summary>
        int CountCharacters(int startPos, int endPos);

        /// <summary>Show or hide the horizontal scroll bar. (Scintilla feature 2130)</summary>
        void SetHScrollBar(bool show);

        /// <summary>Is the horizontal scroll bar visible? (Scintilla feature 2131)</summary>
        bool GetHScrollBar();

        /// <summary>Show or hide indentation guides. (Scintilla feature 2132)</summary>
        void SetIndentationGuides(int indentView);

        /// <summary>Are the indentation guides visible? (Scintilla feature 2133)</summary>
        int GetIndentationGuides();

        /// <summary>
        /// Set the highlighted indentation guide column.
        /// 0 = no highlighted guide.
        /// (Scintilla feature 2134)
        /// </summary>
        void SetHighlightGuide(int column);

        /// <summary>Get the highlighted indentation guide column. (Scintilla feature 2135)</summary>
        int GetHighlightGuide();

        /// <summary>Get the position after the last visible characters on a line. (Scintilla feature 2136)</summary>
        Position GetLineEndPosition(int line);

        /// <summary>Get the code page used to interpret the bytes of the document as characters. (Scintilla feature 2137)</summary>
        int GetCodePage();

        /// <summary>Get the foreground colour of the caret. (Scintilla feature 2138)</summary>
        Colour GetCaretFore();

        /// <summary>In read-only mode? (Scintilla feature 2140)</summary>
        bool GetReadOnly();

        /// <summary>Sets the position of the caret. (Scintilla feature 2141)</summary>
        void SetCurrentPos(Position pos);

        /// <summary>Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2142)</summary>
        void SetSelectionStart(Position pos);

        /// <summary>Returns the position at the start of the selection. (Scintilla feature 2143)</summary>
        Position GetSelectionStart();

        /// <summary>Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2144)</summary>
        void SetSelectionEnd(Position pos);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2145)</summary>
        Position GetSelectionEnd();

        /// <summary>Set caret to a position, while removing any existing selection. (Scintilla feature 2556)</summary>
        void SetEmptySelection(Position pos);

        /// <summary>Sets the print magnification added to the point size of each style for printing. (Scintilla feature 2146)</summary>
        void SetPrintMagnification(int magnification);

        /// <summary>Returns the print magnification. (Scintilla feature 2147)</summary>
        int GetPrintMagnification();

        /// <summary>Modify colours when printing for clearer printed text. (Scintilla feature 2148)</summary>
        void SetPrintColourMode(int mode);

        /// <summary>Returns the print colour mode. (Scintilla feature 2149)</summary>
        int GetPrintColourMode();

        /// <summary>Find some text in the document. (Scintilla feature 2150)</summary>
        Position FindText(int flags, TextToFind ft);

        /// <summary>Retrieve the display line at the top of the display. (Scintilla feature 2152)</summary>
        int GetFirstVisibleLine();

        /// <summary>
        /// Retrieve the contents of a line.
        /// Returns the length of the line.
        /// (Scintilla feature 2153)
        /// </summary>
        unsafe string GetLine(int line);

        /// <summary>Returns the number of lines in the document. There is always at least one. (Scintilla feature 2154)</summary>
        int GetLineCount();

        /// <summary>Sets the size in pixels of the left margin. (Scintilla feature 2155)</summary>
        void SetMarginLeft(int pixelWidth);

        /// <summary>Returns the size in pixels of the left margin. (Scintilla feature 2156)</summary>
        int GetMarginLeft();

        /// <summary>Sets the size in pixels of the right margin. (Scintilla feature 2157)</summary>
        void SetMarginRight(int pixelWidth);

        /// <summary>Returns the size in pixels of the right margin. (Scintilla feature 2158)</summary>
        int GetMarginRight();

        /// <summary>Is the document different from when it was last saved? (Scintilla feature 2159)</summary>
        bool GetModify();

        /// <summary>Select a range of text. (Scintilla feature 2160)</summary>
        void SetSel(Position start, Position end);

        /// <summary>
        /// Retrieve the selected text.
        /// Return the length of the text.
        /// Result is NUL-terminated.
        /// (Scintilla feature 2161)
        /// </summary>
        unsafe string GetSelText();

        /// <summary>
        /// Retrieve a range of text.
        /// Return the length of the text.
        /// (Scintilla feature 2162)
        /// </summary>
        int GetTextRange(TextRange tr);

        /// <summary>Draw the selection in normal style or with selection highlighted. (Scintilla feature 2163)</summary>
        void HideSelection(bool normal);

        /// <summary>Retrieve the x value of the point in the window where a position is displayed. (Scintilla feature 2164)</summary>
        int PointXFromPosition(Position pos);

        /// <summary>Retrieve the y value of the point in the window where a position is displayed. (Scintilla feature 2165)</summary>
        int PointYFromPosition(Position pos);

        /// <summary>Retrieve the line containing a position. (Scintilla feature 2166)</summary>
        int LineFromPosition(Position pos);

        /// <summary>Retrieve the position at the start of a line. (Scintilla feature 2167)</summary>
        Position PositionFromLine(int line);

        /// <summary>Scroll horizontally and vertically. (Scintilla feature 2168)</summary>
        void LineScroll(int columns, int lines);

        /// <summary>Ensure the caret is visible. (Scintilla feature 2169)</summary>
        void ScrollCaret();

        /// <summary>
        /// Scroll the argument positions and the range between them into view giving
        /// priority to the primary position then the secondary position.
        /// This may be used to make a search match visible.
        /// (Scintilla feature 2569)
        /// </summary>
        void ScrollRange(Position secondary, Position primary);

        /// <summary>Replace the selected text with the argument text. (Scintilla feature 2170)</summary>
        unsafe void ReplaceSel(string text);

        /// <summary>Set to read only or read write. (Scintilla feature 2171)</summary>
        void SetReadOnly(bool readOnly);

        /// <summary>Null operation. (Scintilla feature 2172)</summary>
        void Null();

        /// <summary>Will a paste succeed? (Scintilla feature 2173)</summary>
        bool CanPaste();

        /// <summary>Are there any undoable actions in the undo history? (Scintilla feature 2174)</summary>
        bool CanUndo();

        /// <summary>Delete the undo history. (Scintilla feature 2175)</summary>
        void EmptyUndoBuffer();

        /// <summary>Undo one action in the undo history. (Scintilla feature 2176)</summary>
        void Undo();

        /// <summary>Cut the selection to the clipboard. (Scintilla feature 2177)</summary>
        void Cut();

        /// <summary>Copy the selection to the clipboard. (Scintilla feature 2178)</summary>
        void Copy();

        /// <summary>Paste the contents of the clipboard into the document replacing the selection. (Scintilla feature 2179)</summary>
        void Paste();

        /// <summary>Clear the selection. (Scintilla feature 2180)</summary>
        void Clear();

        /// <summary>Replace the contents of the document with the argument text. (Scintilla feature 2181)</summary>
        unsafe void SetText(string text);

        /// <summary>
        /// Retrieve all the text in the document.
        /// Returns number of characters retrieved.
        /// Result is NUL-terminated.
        /// (Scintilla feature 2182)
        /// </summary>
        unsafe string GetText(int length);

        /// <summary>Retrieve the number of characters in the document. (Scintilla feature 2183)</summary>
        int GetTextLength();

        /// <summary>Retrieve a pointer to a function that processes messages for this Scintilla. (Scintilla feature 2184)</summary>
        IntPtr GetDirectFunction();

        /// <summary>
        /// Retrieve a pointer value to use as the first argument when calling
        /// the function returned by GetDirectFunction.
        /// (Scintilla feature 2185)
        /// </summary>
        IntPtr GetDirectPointer();

        /// <summary>Set to overtype (true) or insert mode. (Scintilla feature 2186)</summary>
        void SetOvertype(bool overtype);

        /// <summary>Returns true if overtype mode is active otherwise false is returned. (Scintilla feature 2187)</summary>
        bool GetOvertype();

        /// <summary>Set the width of the insert mode caret. (Scintilla feature 2188)</summary>
        void SetCaretWidth(int pixelWidth);

        /// <summary>Returns the width of the insert mode caret. (Scintilla feature 2189)</summary>
        int GetCaretWidth();

        /// <summary>
        /// Sets the position that starts the target which is used for updating the
        /// document without affecting the scroll position.
        /// (Scintilla feature 2190)
        /// </summary>
        void SetTargetStart(Position pos);

        /// <summary>Get the position that starts the target. (Scintilla feature 2191)</summary>
        Position GetTargetStart();

        /// <summary>
        /// Sets the position that ends the target which is used for updating the
        /// document without affecting the scroll position.
        /// (Scintilla feature 2192)
        /// </summary>
        void SetTargetEnd(Position pos);

        /// <summary>Get the position that ends the target. (Scintilla feature 2193)</summary>
        Position GetTargetEnd();

        /// <summary>Sets both the start and end of the target in one call. (Scintilla feature 2686)</summary>
        void SetTargetRange(Position start, Position end);

        /// <summary>Retrieve the text in the target. (Scintilla feature 2687)</summary>
        unsafe string GetTargetText();

        /// <summary>
        /// Replace the target text with the argument text.
        /// Text is counted so it can contain NULs.
        /// Returns the length of the replacement text.
        /// (Scintilla feature 2194)
        /// </summary>
        unsafe int ReplaceTarget(int length, string text);

        /// <summary>
        /// Replace the target text with the argument text after \d processing.
        /// Text is counted so it can contain NULs.
        /// Looks for \d where d is between 1 and 9 and replaces these with the strings
        /// matched in the last search operation which were surrounded by \( and \).
        /// Returns the length of the replacement text including any change
        /// caused by processing the \d patterns.
        /// (Scintilla feature 2195)
        /// </summary>
        unsafe int ReplaceTargetRE(int length, string text);

        /// <summary>
        /// Search for a counted string in the target and set the target to the found
        /// range. Text is counted so it can contain NULs.
        /// Returns length of range or -1 for failure in which case target is not moved.
        /// (Scintilla feature 2197)
        /// </summary>
        unsafe int SearchInTarget(int length, string text);

        /// <summary>Set the search flags used by SearchInTarget. (Scintilla feature 2198)</summary>
        void SetSearchFlags(int flags);

        /// <summary>Get the search flags used by SearchInTarget. (Scintilla feature 2199)</summary>
        int GetSearchFlags();

        /// <summary>Show a call tip containing a definition near position pos. (Scintilla feature 2200)</summary>
        unsafe void CallTipShow(Position pos, string definition);

        /// <summary>Remove the call tip from the screen. (Scintilla feature 2201)</summary>
        void CallTipCancel();

        /// <summary>Is there an active call tip? (Scintilla feature 2202)</summary>
        bool CallTipActive();

        /// <summary>Retrieve the position where the caret was before displaying the call tip. (Scintilla feature 2203)</summary>
        Position CallTipPosStart();

        /// <summary>Set the start position in order to change when backspacing removes the calltip. (Scintilla feature 2214)</summary>
        void CallTipSetPosStart(int posStart);

        /// <summary>Highlight a segment of the definition. (Scintilla feature 2204)</summary>
        void CallTipSetHlt(int start, int end);

        /// <summary>Set the background colour for the call tip. (Scintilla feature 2205)</summary>
        void CallTipSetBack(Colour back);

        /// <summary>Set the foreground colour for the call tip. (Scintilla feature 2206)</summary>
        void CallTipSetFore(Colour fore);

        /// <summary>Set the foreground colour for the highlighted part of the call tip. (Scintilla feature 2207)</summary>
        void CallTipSetForeHlt(Colour fore);

        /// <summary>Enable use of STYLE_CALLTIP and set call tip tab size in pixels. (Scintilla feature 2212)</summary>
        void CallTipUseStyle(int tabSize);

        /// <summary>Set position of calltip, above or below text. (Scintilla feature 2213)</summary>
        void CallTipSetPosition(bool above);

        /// <summary>Find the display line of a document line taking hidden lines into account. (Scintilla feature 2220)</summary>
        int VisibleFromDocLine(int line);

        /// <summary>Find the document line of a display line taking hidden lines into account. (Scintilla feature 2221)</summary>
        int DocLineFromVisible(int lineDisplay);

        /// <summary>The number of display lines needed to wrap a document line (Scintilla feature 2235)</summary>
        int WrapCount(int line);

        /// <summary>
        /// Set the fold level of a line.
        /// This encodes an integer level along with flags indicating whether the
        /// line is a header and whether it is effectively white space.
        /// (Scintilla feature 2222)
        /// </summary>
        void SetFoldLevel(int line, int level);

        /// <summary>Retrieve the fold level of a line. (Scintilla feature 2223)</summary>
        int GetFoldLevel(int line);

        /// <summary>Find the last child line of a header line. (Scintilla feature 2224)</summary>
        int GetLastChild(int line, int level);

        /// <summary>Find the parent line of a child line. (Scintilla feature 2225)</summary>
        int GetFoldParent(int line);

        /// <summary>Make a range of lines visible. (Scintilla feature 2226)</summary>
        void ShowLines(int lineStart, int lineEnd);

        /// <summary>Make a range of lines invisible. (Scintilla feature 2227)</summary>
        void HideLines(int lineStart, int lineEnd);

        /// <summary>Is a line visible? (Scintilla feature 2228)</summary>
        bool GetLineVisible(int line);

        /// <summary>Are all lines visible? (Scintilla feature 2236)</summary>
        bool GetAllLinesVisible();

        /// <summary>Show the children of a header line. (Scintilla feature 2229)</summary>
        void SetFoldExpanded(int line, bool expanded);

        /// <summary>Is a header line expanded? (Scintilla feature 2230)</summary>
        bool GetFoldExpanded(int line);

        /// <summary>Switch a header line between expanded and contracted. (Scintilla feature 2231)</summary>
        void ToggleFold(int line);

        /// <summary>Expand or contract a fold header. (Scintilla feature 2237)</summary>
        void FoldLine(int line, int action);

        /// <summary>Expand or contract a fold header and its children. (Scintilla feature 2238)</summary>
        void FoldChildren(int line, int action);

        /// <summary>Expand a fold header and all children. Use the level argument instead of the line's current level. (Scintilla feature 2239)</summary>
        void ExpandChildren(int line, int level);

        /// <summary>Expand or contract all fold headers. (Scintilla feature 2662)</summary>
        void FoldAll(int action);

        /// <summary>Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature 2232)</summary>
        void EnsureVisible(int line);

        /// <summary>Set automatic folding behaviours. (Scintilla feature 2663)</summary>
        void SetAutomaticFold(int automaticFold);

        /// <summary>Get automatic folding behaviours. (Scintilla feature 2664)</summary>
        int GetAutomaticFold();

        /// <summary>Set some style options for folding. (Scintilla feature 2233)</summary>
        void SetFoldFlags(int flags);

        /// <summary>
        /// Ensure a particular line is visible by expanding any header line hiding it.
        /// Use the currently set visibility policy to determine which range to display.
        /// (Scintilla feature 2234)
        /// </summary>
        void EnsureVisibleEnforcePolicy(int line);

        /// <summary>Sets whether a tab pressed when caret is within indentation indents. (Scintilla feature 2260)</summary>
        void SetTabIndents(bool tabIndents);

        /// <summary>Does a tab pressed when caret is within indentation indent? (Scintilla feature 2261)</summary>
        bool GetTabIndents();

        /// <summary>Sets whether a backspace pressed when caret is within indentation unindents. (Scintilla feature 2262)</summary>
        void SetBackSpaceUnIndents(bool bsUnIndents);

        /// <summary>Does a backspace pressed when caret is within indentation unindent? (Scintilla feature 2263)</summary>
        bool GetBackSpaceUnIndents();

        /// <summary>Sets the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2264)</summary>
        void SetMouseDwellTime(int periodMilliseconds);

        /// <summary>Retrieve the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2265)</summary>
        int GetMouseDwellTime();

        /// <summary>Get position of start of word. (Scintilla feature 2266)</summary>
        int WordStartPosition(Position pos, bool onlyWordCharacters);

        /// <summary>Get position of end of word. (Scintilla feature 2267)</summary>
        int WordEndPosition(Position pos, bool onlyWordCharacters);

        /// <summary>Sets whether text is word wrapped. (Scintilla feature 2268)</summary>
        void SetWrapMode(int mode);

        /// <summary>Retrieve whether text is word wrapped. (Scintilla feature 2269)</summary>
        int GetWrapMode();

        /// <summary>Set the display mode of visual flags for wrapped lines. (Scintilla feature 2460)</summary>
        void SetWrapVisualFlags(int wrapVisualFlags);

        /// <summary>Retrive the display mode of visual flags for wrapped lines. (Scintilla feature 2461)</summary>
        int GetWrapVisualFlags();

        /// <summary>Set the location of visual flags for wrapped lines. (Scintilla feature 2462)</summary>
        void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation);

        /// <summary>Retrive the location of visual flags for wrapped lines. (Scintilla feature 2463)</summary>
        int GetWrapVisualFlagsLocation();

        /// <summary>Set the start indent for wrapped lines. (Scintilla feature 2464)</summary>
        void SetWrapStartIndent(int indent);

        /// <summary>Retrive the start indent for wrapped lines. (Scintilla feature 2465)</summary>
        int GetWrapStartIndent();

        /// <summary>Sets how wrapped sublines are placed. Default is fixed. (Scintilla feature 2472)</summary>
        void SetWrapIndentMode(int mode);

        /// <summary>Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature 2473)</summary>
        int GetWrapIndentMode();

        /// <summary>Sets the degree of caching of layout information. (Scintilla feature 2272)</summary>
        void SetLayoutCache(int mode);

        /// <summary>Retrieve the degree of caching of layout information. (Scintilla feature 2273)</summary>
        int GetLayoutCache();

        /// <summary>Sets the document width assumed for scrolling. (Scintilla feature 2274)</summary>
        void SetScrollWidth(int pixelWidth);

        /// <summary>Retrieve the document width assumed for scrolling. (Scintilla feature 2275)</summary>
        int GetScrollWidth();

        /// <summary>Sets whether the maximum width line displayed is used to set scroll width. (Scintilla feature 2516)</summary>
        void SetScrollWidthTracking(bool tracking);

        /// <summary>Retrieve whether the scroll width tracks wide lines. (Scintilla feature 2517)</summary>
        bool GetScrollWidthTracking();

        /// <summary>
        /// Measure the pixel width of some text in a particular style.
        /// NUL terminated text argument.
        /// Does not handle tab or control characters.
        /// (Scintilla feature 2276)
        /// </summary>
        unsafe int TextWidth(int style, string text);

        /// <summary>
        /// Sets the scroll range so that maximum scroll position has
        /// the last line at the bottom of the view (default).
        /// Setting this to false allows scrolling one page below the last line.
        /// (Scintilla feature 2277)
        /// </summary>
        void SetEndAtLastLine(bool endAtLastLine);

        /// <summary>
        /// Retrieve whether the maximum scroll position has the last
        /// line at the bottom of the view.
        /// (Scintilla feature 2278)
        /// </summary>
        bool GetEndAtLastLine();

        /// <summary>Retrieve the height of a particular line of text in pixels. (Scintilla feature 2279)</summary>
        int TextHeight(int line);

        /// <summary>Show or hide the vertical scroll bar. (Scintilla feature 2280)</summary>
        void SetVScrollBar(bool show);

        /// <summary>Is the vertical scroll bar visible? (Scintilla feature 2281)</summary>
        bool GetVScrollBar();

        /// <summary>Append a string to the end of the document without changing the selection. (Scintilla feature 2282)</summary>
        unsafe void AppendText(int length, string text);

        /// <summary>Is drawing done in two phases with backgrounds drawn before foregrounds? (Scintilla feature 2283)</summary>
        bool GetTwoPhaseDraw();

        /// <summary>
        /// In twoPhaseDraw mode, drawing is performed in two phases, first the background
        /// and then the foreground. This avoids chopping off characters that overlap the next run.
        /// (Scintilla feature 2284)
        /// </summary>
        void SetTwoPhaseDraw(bool twoPhase);

        /// <summary>How many phases is drawing done in? (Scintilla feature 2673)</summary>
        int GetPhasesDraw();

        /// <summary>
        /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap.
        /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally.
        /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text
        /// to overlap from one line to the next.
        /// (Scintilla feature 2674)
        /// </summary>
        void SetPhasesDraw(int phases);

        /// <summary>Choose the quality level for text from the FontQuality enumeration. (Scintilla feature 2611)</summary>
        void SetFontQuality(int fontQuality);

        /// <summary>Retrieve the quality level for text. (Scintilla feature 2612)</summary>
        int GetFontQuality();

        /// <summary>Scroll so that a display line is at the top of the display. (Scintilla feature 2613)</summary>
        void SetFirstVisibleLine(int lineDisplay);

        /// <summary>Change the effect of pasting when there are multiple selections. (Scintilla feature 2614)</summary>
        void SetMultiPaste(int multiPaste);

        /// <summary>Retrieve the effect of pasting when there are multiple selections.. (Scintilla feature 2615)</summary>
        int GetMultiPaste();

        /// <summary>
        /// Retrieve the value of a tag from a regular expression search.
        /// Result is NUL-terminated.
        /// (Scintilla feature 2616)
        /// </summary>
        unsafe string GetTag(int tagNumber);

        /// <summary>Make the target range start and end be the same as the selection range start and end. (Scintilla feature 2287)</summary>
        void TargetFromSelection();

        /// <summary>Join the lines in the target. (Scintilla feature 2288)</summary>
        void LinesJoin();

        /// <summary>
        /// Split the lines in the target into lines that are less wide than pixelWidth
        /// where possible.
        /// (Scintilla feature 2289)
        /// </summary>
        void LinesSplit(int pixelWidth);

        /// <summary>Set the colours used as a chequerboard pattern in the fold margin (Scintilla feature 2290)</summary>
        void SetFoldMarginColour(bool useSetting, Colour back);

        /// <summary>Set the colours used as a chequerboard pattern in the fold margin (Scintilla feature 2291)</summary>
        void SetFoldMarginHiColour(bool useSetting, Colour fore);

        /// <summary>Move caret down one line. (Scintilla feature 2300)</summary>
        void LineDown();

        /// <summary>Move caret down one line extending selection to new caret position. (Scintilla feature 2301)</summary>
        void LineDownExtend();

        /// <summary>Move caret up one line. (Scintilla feature 2302)</summary>
        void LineUp();

        /// <summary>Move caret up one line extending selection to new caret position. (Scintilla feature 2303)</summary>
        void LineUpExtend();

        /// <summary>Move caret left one character. (Scintilla feature 2304)</summary>
        void CharLeft();

        /// <summary>Move caret left one character extending selection to new caret position. (Scintilla feature 2305)</summary>
        void CharLeftExtend();

        /// <summary>Move caret right one character. (Scintilla feature 2306)</summary>
        void CharRight();

        /// <summary>Move caret right one character extending selection to new caret position. (Scintilla feature 2307)</summary>
        void CharRightExtend();

        /// <summary>Move caret left one word. (Scintilla feature 2308)</summary>
        void WordLeft();

        /// <summary>Move caret left one word extending selection to new caret position. (Scintilla feature 2309)</summary>
        void WordLeftExtend();

        /// <summary>Move caret right one word. (Scintilla feature 2310)</summary>
        void WordRight();

        /// <summary>Move caret right one word extending selection to new caret position. (Scintilla feature 2311)</summary>
        void WordRightExtend();

        /// <summary>Move caret to first position on line. (Scintilla feature 2312)</summary>
        void Home();

        /// <summary>Move caret to first position on line extending selection to new caret position. (Scintilla feature 2313)</summary>
        void HomeExtend();

        /// <summary>Move caret to last position on line. (Scintilla feature 2314)</summary>
        void LineEnd();

        /// <summary>Move caret to last position on line extending selection to new caret position. (Scintilla feature 2315)</summary>
        void LineEndExtend();

        /// <summary>Move caret to first position in document. (Scintilla feature 2316)</summary>
        void DocumentStart();

        /// <summary>Move caret to first position in document extending selection to new caret position. (Scintilla feature 2317)</summary>
        void DocumentStartExtend();

        /// <summary>Move caret to last position in document. (Scintilla feature 2318)</summary>
        void DocumentEnd();

        /// <summary>Move caret to last position in document extending selection to new caret position. (Scintilla feature 2319)</summary>
        void DocumentEndExtend();

        /// <summary>Move caret one page up. (Scintilla feature 2320)</summary>
        void PageUp();

        /// <summary>Move caret one page up extending selection to new caret position. (Scintilla feature 2321)</summary>
        void PageUpExtend();

        /// <summary>Move caret one page down. (Scintilla feature 2322)</summary>
        void PageDown();

        /// <summary>Move caret one page down extending selection to new caret position. (Scintilla feature 2323)</summary>
        void PageDownExtend();

        /// <summary>Switch from insert to overtype mode or the reverse. (Scintilla feature 2324)</summary>
        void EditToggleOvertype();

        /// <summary>Cancel any modes such as call tip or auto-completion list display. (Scintilla feature 2325)</summary>
        void Cancel();

        /// <summary>Delete the selection or if no selection, the character before the caret. (Scintilla feature 2326)</summary>
        void DeleteBack();

        /// <summary>
        /// If selection is empty or all on one line replace the selection with a tab character.
        /// If more than one line selected, indent the lines.
        /// (Scintilla feature 2327)
        /// </summary>
        void Tab();

        /// <summary>Dedent the selected lines. (Scintilla feature 2328)</summary>
        void BackTab();

        /// <summary>Insert a new line, may use a CRLF, CR or LF depending on EOL mode. (Scintilla feature 2329)</summary>
        void NewLine();

        /// <summary>Insert a Form Feed character. (Scintilla feature 2330)</summary>
        void FormFeed();

        /// <summary>
        /// Move caret to before first visible character on line.
        /// If already there move to first character on line.
        /// (Scintilla feature 2331)
        /// </summary>
        void VCHome();

        /// <summary>Like VCHome but extending selection to new caret position. (Scintilla feature 2332)</summary>
        void VCHomeExtend();

        /// <summary>Magnify the displayed text by increasing the sizes by 1 point. (Scintilla feature 2333)</summary>
        void ZoomIn();

        /// <summary>Make the displayed text smaller by decreasing the sizes by 1 point. (Scintilla feature 2334)</summary>
        void ZoomOut();

        /// <summary>Delete the word to the left of the caret. (Scintilla feature 2335)</summary>
        void DelWordLeft();

        /// <summary>Delete the word to the right of the caret. (Scintilla feature 2336)</summary>
        void DelWordRight();

        /// <summary>Delete the word to the right of the caret, but not the trailing non-word characters. (Scintilla feature 2518)</summary>
        void DelWordRightEnd();

        /// <summary>Cut the line containing the caret. (Scintilla feature 2337)</summary>
        void LineCut();

        /// <summary>Delete the line containing the caret. (Scintilla feature 2338)</summary>
        void LineDelete();

        /// <summary>Switch the current line with the previous. (Scintilla feature 2339)</summary>
        void LineTranspose();

        /// <summary>Duplicate the current line. (Scintilla feature 2404)</summary>
        void LineDuplicate();

        /// <summary>Transform the selection to lower case. (Scintilla feature 2340)</summary>
        void LowerCase();

        /// <summary>Transform the selection to upper case. (Scintilla feature 2341)</summary>
        void UpperCase();

        /// <summary>Scroll the document down, keeping the caret visible. (Scintilla feature 2342)</summary>
        void LineScrollDown();

        /// <summary>Scroll the document up, keeping the caret visible. (Scintilla feature 2343)</summary>
        void LineScrollUp();

        /// <summary>
        /// Delete the selection or if no selection, the character before the caret.
        /// Will not delete the character before at the start of a line.
        /// (Scintilla feature 2344)
        /// </summary>
        void DeleteBackNotLine();

        /// <summary>Move caret to first position on display line. (Scintilla feature 2345)</summary>
        void HomeDisplay();

        /// <summary>
        /// Move caret to first position on display line extending selection to
        /// new caret position.
        /// (Scintilla feature 2346)
        /// </summary>
        void HomeDisplayExtend();

        /// <summary>Move caret to last position on display line. (Scintilla feature 2347)</summary>
        void LineEndDisplay();

        /// <summary>
        /// Move caret to last position on display line extending selection to new
        /// caret position.
        /// (Scintilla feature 2348)
        /// </summary>
        void LineEndDisplayExtend();

        /// <summary>
        /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
        /// except they behave differently when word-wrap is enabled:
        /// They go first to the start / end of the display line, like (Home|LineEnd)Display
        /// The difference is that, the cursor is already at the point, it goes on to the start
        /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
        /// (Scintilla feature 2349)
        /// </summary>
        void HomeWrap();

        /// <summary>
        /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
        /// except they behave differently when word-wrap is enabled:
        /// They go first to the start / end of the display line, like (Home|LineEnd)Display
        /// The difference is that, the cursor is already at the point, it goes on to the start
        /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
        /// (Scintilla feature 2450)
        /// </summary>
        void HomeWrapExtend();

        /// <summary>
        /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
        /// except they behave differently when word-wrap is enabled:
        /// They go first to the start / end of the display line, like (Home|LineEnd)Display
        /// The difference is that, the cursor is already at the point, it goes on to the start
        /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
        /// (Scintilla feature 2451)
        /// </summary>
        void LineEndWrap();

        /// <summary>
        /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
        /// except they behave differently when word-wrap is enabled:
        /// They go first to the start / end of the display line, like (Home|LineEnd)Display
        /// The difference is that, the cursor is already at the point, it goes on to the start
        /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
        /// (Scintilla feature 2452)
        /// </summary>
        void LineEndWrapExtend();

        /// <summary>
        /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
        /// except they behave differently when word-wrap is enabled:
        /// They go first to the start / end of the display line, like (Home|LineEnd)Display
        /// The difference is that, the cursor is already at the point, it goes on to the start
        /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
        /// (Scintilla feature 2453)
        /// </summary>
        void VCHomeWrap();

        /// <summary>
        /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
        /// except they behave differently when word-wrap is enabled:
        /// They go first to the start / end of the display line, like (Home|LineEnd)Display
        /// The difference is that, the cursor is already at the point, it goes on to the start
        /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
        /// (Scintilla feature 2454)
        /// </summary>
        void VCHomeWrapExtend();

        /// <summary>Copy the line containing the caret. (Scintilla feature 2455)</summary>
        void LineCopy();

        /// <summary>Move the caret inside current view if it's not there already. (Scintilla feature 2401)</summary>
        void MoveCaretInsideView();

        /// <summary>How many characters are on a line, including end of line characters? (Scintilla feature 2350)</summary>
        int LineLength(int line);

        /// <summary>Highlight the characters at two positions. (Scintilla feature 2351)</summary>
        void BraceHighlight(Position pos1, Position pos2);

        /// <summary>Use specified indicator to highlight matching braces instead of changing their style. (Scintilla feature 2498)</summary>
        void BraceHighlightIndicator(bool useBraceHighlightIndicator, int indicator);

        /// <summary>Highlight the character at a position indicating there is no matching brace. (Scintilla feature 2352)</summary>
        void BraceBadLight(Position pos);

        /// <summary>Use specified indicator to highlight non matching brace instead of changing its style. (Scintilla feature 2499)</summary>
        void BraceBadLightIndicator(bool useBraceBadLightIndicator, int indicator);

        /// <summary>Find the position of a matching brace or INVALID_POSITION if no match. (Scintilla feature 2353)</summary>
        Position BraceMatch(Position pos);

        /// <summary>Are the end of line characters visible? (Scintilla feature 2355)</summary>
        bool GetViewEOL();

        /// <summary>Make the end of line characters visible or invisible. (Scintilla feature 2356)</summary>
        void SetViewEOL(bool visible);

        /// <summary>Retrieve a pointer to the document object. (Scintilla feature 2357)</summary>
        IntPtr GetDocPointer();

        /// <summary>Change the document object used. (Scintilla feature 2358)</summary>
        void SetDocPointer(IntPtr pointer);

        /// <summary>Set which document modification events are sent to the container. (Scintilla feature 2359)</summary>
        void SetModEventMask(int mask);

        /// <summary>Retrieve the column number which text should be kept within. (Scintilla feature 2360)</summary>
        int GetEdgeColumn();

        /// <summary>
        /// Set the column number of the edge.
        /// If text goes past the edge then it is highlighted.
        /// (Scintilla feature 2361)
        /// </summary>
        void SetEdgeColumn(int column);

        /// <summary>Retrieve the edge highlight mode. (Scintilla feature 2362)</summary>
        int GetEdgeMode();

        /// <summary>
        /// The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
        /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
        /// (Scintilla feature 2363)
        /// </summary>
        void SetEdgeMode(int mode);

        /// <summary>Retrieve the colour used in edge indication. (Scintilla feature 2364)</summary>
        Colour GetEdgeColour();

        /// <summary>Change the colour used in edge indication. (Scintilla feature 2365)</summary>
        void SetEdgeColour(Colour edgeColour);

        /// <summary>Sets the current caret position to be the search anchor. (Scintilla feature 2366)</summary>
        void SearchAnchor();

        /// <summary>
        /// Find some text starting at the search anchor.
        /// Does not ensure the selection is visible.
        /// (Scintilla feature 2367)
        /// </summary>
        unsafe int SearchNext(int flags, string text);

        /// <summary>
        /// Find some text starting at the search anchor and moving backwards.
        /// Does not ensure the selection is visible.
        /// (Scintilla feature 2368)
        /// </summary>
        unsafe int SearchPrev(int flags, string text);

        /// <summary>Retrieves the number of lines completely visible. (Scintilla feature 2370)</summary>
        int LinesOnScreen();

        /// <summary>
        /// Set whether a pop up menu is displayed automatically when the user presses
        /// the wrong mouse button.
        /// (Scintilla feature 2371)
        /// </summary>
        void UsePopUp(bool allowPopUp);

        /// <summary>Is the selection rectangular? The alternative is the more common stream selection. (Scintilla feature 2372)</summary>
        bool SelectionIsRectangle();

        /// <summary>
        /// Set the zoom level. This number of points is added to the size of all fonts.
        /// It may be positive to magnify or negative to reduce.
        /// (Scintilla feature 2373)
        /// </summary>
        void SetZoom(int zoom);

        /// <summary>Retrieve the zoom level. (Scintilla feature 2374)</summary>
        int GetZoom();

        /// <summary>
        /// Create a new document object.
        /// Starts with reference count of 1 and not selected into editor.
        /// (Scintilla feature 2375)
        /// </summary>
        int CreateDocument();

        /// <summary>Extend life of document. (Scintilla feature 2376)</summary>
        void AddRefDocument(int doc);

        /// <summary>Release a reference to the document, deleting document if it fades to black. (Scintilla feature 2377)</summary>
        void ReleaseDocument(int doc);

        /// <summary>Get which document modification events are sent to the container. (Scintilla feature 2378)</summary>
        int GetModEventMask();

        /// <summary>Change internal focus flag. (Scintilla feature 2380)</summary>
        void SetFocus(bool focus);

        /// <summary>Get internal focus flag. (Scintilla feature 2381)</summary>
        bool GetFocus();

        /// <summary>Change error status - 0 = OK. (Scintilla feature 2382)</summary>
        void SetStatus(int statusCode);

        /// <summary>Get error status. (Scintilla feature 2383)</summary>
        int GetStatus();

        /// <summary>Set whether the mouse is captured when its button is pressed. (Scintilla feature 2384)</summary>
        void SetMouseDownCaptures(bool captures);

        /// <summary>Get whether mouse gets captured. (Scintilla feature 2385)</summary>
        bool GetMouseDownCaptures();

        /// <summary>Sets the cursor to one of the SC_CURSOR* values. (Scintilla feature 2386)</summary>
        void SetCursor(int cursorType);

        /// <summary>Get cursor type. (Scintilla feature 2387)</summary>
        int GetCursor();

        /// <summary>
        /// Change the way control characters are displayed:
        /// If symbol is < 32, keep the drawn way, else, use the given character.
        /// (Scintilla feature 2388)
        /// </summary>
        void SetControlCharSymbol(int symbol);

        /// <summary>Get the way control characters are displayed. (Scintilla feature 2389)</summary>
        int GetControlCharSymbol();

        /// <summary>Move to the previous change in capitalisation. (Scintilla feature 2390)</summary>
        void WordPartLeft();

        /// <summary>
        /// Move to the previous change in capitalisation extending selection
        /// to new caret position.
        /// (Scintilla feature 2391)
        /// </summary>
        void WordPartLeftExtend();

        /// <summary>Move to the change next in capitalisation. (Scintilla feature 2392)</summary>
        void WordPartRight();

        /// <summary>
        /// Move to the next change in capitalisation extending selection
        /// to new caret position.
        /// (Scintilla feature 2393)
        /// </summary>
        void WordPartRightExtend();

        /// <summary>
        /// Set the way the display area is determined when a particular line
        /// is to be moved to by Find, FindNext, GotoLine, etc.
        /// (Scintilla feature 2394)
        /// </summary>
        void SetVisiblePolicy(int visiblePolicy, int visibleSlop);

        /// <summary>Delete back from the current position to the start of the line. (Scintilla feature 2395)</summary>
        void DelLineLeft();

        /// <summary>Delete forwards from the current position to the end of the line. (Scintilla feature 2396)</summary>
        void DelLineRight();

        /// <summary>Get and Set the xOffset (ie, horizontal scroll position). (Scintilla feature 2397)</summary>
        void SetXOffset(int newOffset);

        /// <summary>Get and Set the xOffset (ie, horizontal scroll position). (Scintilla feature 2398)</summary>
        int GetXOffset();

        /// <summary>Set the last x chosen value to be the caret x position. (Scintilla feature 2399)</summary>
        void ChooseCaretX();

        /// <summary>Set the focus to this Scintilla widget. (Scintilla feature 2400)</summary>
        void GrabFocus();

        /// <summary>
        /// Set the way the caret is kept visible when going sideways.
        /// The exclusion zone is given in pixels.
        /// (Scintilla feature 2402)
        /// </summary>
        void SetXCaretPolicy(int caretPolicy, int caretSlop);

        /// <summary>
        /// Set the way the line the caret is on is kept visible.
        /// The exclusion zone is given in lines.
        /// (Scintilla feature 2403)
        /// </summary>
        void SetYCaretPolicy(int caretPolicy, int caretSlop);

        /// <summary>Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). (Scintilla feature 2406)</summary>
        void SetPrintWrapMode(int mode);

        /// <summary>Is printing line wrapped? (Scintilla feature 2407)</summary>
        int GetPrintWrapMode();

        /// <summary>Set a fore colour for active hotspots. (Scintilla feature 2410)</summary>
        void SetHotspotActiveFore(bool useSetting, Colour fore);

        /// <summary>Get the fore colour for active hotspots. (Scintilla feature 2494)</summary>
        Colour GetHotspotActiveFore();

        /// <summary>Set a back colour for active hotspots. (Scintilla feature 2411)</summary>
        void SetHotspotActiveBack(bool useSetting, Colour back);

        /// <summary>Get the back colour for active hotspots. (Scintilla feature 2495)</summary>
        Colour GetHotspotActiveBack();

        /// <summary>Enable / Disable underlining active hotspots. (Scintilla feature 2412)</summary>
        void SetHotspotActiveUnderline(bool underline);

        /// <summary>Get whether underlining for active hotspots. (Scintilla feature 2496)</summary>
        bool GetHotspotActiveUnderline();

        /// <summary>Limit hotspots to single line so hotspots on two lines don't merge. (Scintilla feature 2421)</summary>
        void SetHotspotSingleLine(bool singleLine);

        /// <summary>Get the HotspotSingleLine property (Scintilla feature 2497)</summary>
        bool GetHotspotSingleLine();

        /// <summary>Move caret between paragraphs (delimited by empty lines). (Scintilla feature 2413)</summary>
        void ParaDown();

        /// <summary>Move caret between paragraphs (delimited by empty lines). (Scintilla feature 2414)</summary>
        void ParaDownExtend();

        /// <summary>Move caret between paragraphs (delimited by empty lines). (Scintilla feature 2415)</summary>
        void ParaUp();

        /// <summary>Move caret between paragraphs (delimited by empty lines). (Scintilla feature 2416)</summary>
        void ParaUpExtend();

        /// <summary>
        /// Given a valid document position, return the previous position taking code
        /// page into account. Returns 0 if passed 0.
        /// (Scintilla feature 2417)
        /// </summary>
        Position PositionBefore(Position pos);

        /// <summary>
        /// Given a valid document position, return the next position taking code
        /// page into account. Maximum value returned is the last position in the document.
        /// (Scintilla feature 2418)
        /// </summary>
        Position PositionAfter(Position pos);

        /// <summary>
        /// Given a valid document position, return a position that differs in a number
        /// of characters. Returned value is always between 0 and last position in document.
        /// (Scintilla feature 2670)
        /// </summary>
        Position PositionRelative(Position pos, int relative);

        /// <summary>Copy a range of text to the clipboard. Positions are clipped into the document. (Scintilla feature 2419)</summary>
        void CopyRange(Position start, Position end);

        /// <summary>Copy argument text to the clipboard. (Scintilla feature 2420)</summary>
        unsafe void CopyText(int length, string text);

        /// <summary>
        /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or
        /// by lines (SC_SEL_LINES).
        /// (Scintilla feature 2422)
        /// </summary>
        void SetSelectionMode(int mode);

        /// <summary>Get the mode of the current selection. (Scintilla feature 2423)</summary>
        int GetSelectionMode();

        /// <summary>Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2424)</summary>
        Position GetLineSelStartPosition(int line);

        /// <summary>Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2425)</summary>
        Position GetLineSelEndPosition(int line);

        /// <summary>Move caret down one line, extending rectangular selection to new caret position. (Scintilla feature 2426)</summary>
        void LineDownRectExtend();

        /// <summary>Move caret up one line, extending rectangular selection to new caret position. (Scintilla feature 2427)</summary>
        void LineUpRectExtend();

        /// <summary>Move caret left one character, extending rectangular selection to new caret position. (Scintilla feature 2428)</summary>
        void CharLeftRectExtend();

        /// <summary>Move caret right one character, extending rectangular selection to new caret position. (Scintilla feature 2429)</summary>
        void CharRightRectExtend();

        /// <summary>Move caret to first position on line, extending rectangular selection to new caret position. (Scintilla feature 2430)</summary>
        void HomeRectExtend();

        /// <summary>
        /// Move caret to before first visible character on line.
        /// If already there move to first character on line.
        /// In either case, extend rectangular selection to new caret position.
        /// (Scintilla feature 2431)
        /// </summary>
        void VCHomeRectExtend();

        /// <summary>Move caret to last position on line, extending rectangular selection to new caret position. (Scintilla feature 2432)</summary>
        void LineEndRectExtend();

        /// <summary>Move caret one page up, extending rectangular selection to new caret position. (Scintilla feature 2433)</summary>
        void PageUpRectExtend();

        /// <summary>Move caret one page down, extending rectangular selection to new caret position. (Scintilla feature 2434)</summary>
        void PageDownRectExtend();

        /// <summary>Move caret to top of page, or one page up if already at top of page. (Scintilla feature 2435)</summary>
        void StutteredPageUp();

        /// <summary>Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. (Scintilla feature 2436)</summary>
        void StutteredPageUpExtend();

        /// <summary>Move caret to bottom of page, or one page down if already at bottom of page. (Scintilla feature 2437)</summary>
        void StutteredPageDown();

        /// <summary>Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. (Scintilla feature 2438)</summary>
        void StutteredPageDownExtend();

        /// <summary>Move caret left one word, position cursor at end of word. (Scintilla feature 2439)</summary>
        void WordLeftEnd();

        /// <summary>Move caret left one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2440)</summary>
        void WordLeftEndExtend();

        /// <summary>Move caret right one word, position cursor at end of word. (Scintilla feature 2441)</summary>
        void WordRightEnd();

        /// <summary>Move caret right one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2442)</summary>
        void WordRightEndExtend();

        /// <summary>
        /// Set the set of characters making up whitespace for when moving or selecting by word.
        /// Should be called after SetWordChars.
        /// (Scintilla feature 2443)
        /// </summary>
        unsafe void SetWhitespaceChars(string characters);

        /// <summary>Get the set of characters making up whitespace for when moving or selecting by word. (Scintilla feature 2647)</summary>
        unsafe string GetWhitespaceChars();

        /// <summary>
        /// Set the set of characters making up punctuation characters
        /// Should be called after SetWordChars.
        /// (Scintilla feature 2648)
        /// </summary>
        unsafe void SetPunctuationChars(string characters);

        /// <summary>Get the set of characters making up punctuation characters (Scintilla feature 2649)</summary>
        unsafe string GetPunctuationChars();

        /// <summary>Reset the set of characters for whitespace and word characters to the defaults. (Scintilla feature 2444)</summary>
        void SetCharsDefault();

        /// <summary>Get currently selected item position in the auto-completion list (Scintilla feature 2445)</summary>
        int AutoCGetCurrent();

        /// <summary>
        /// Get currently selected item text in the auto-completion list
        /// Returns the length of the item text
        /// Result is NUL-terminated.
        /// (Scintilla feature 2610)
        /// </summary>
        unsafe string AutoCGetCurrentText();

        /// <summary>Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. (Scintilla feature 2634)</summary>
        void AutoCSetCaseInsensitiveBehaviour(int behaviour);

        /// <summary>Get auto-completion case insensitive behaviour. (Scintilla feature 2635)</summary>
        int AutoCGetCaseInsensitiveBehaviour();

        /// <summary>Change the effect of autocompleting when there are multiple selections. (Scintilla feature 2636)</summary>
        void AutoCSetMulti(int multi);

        /// <summary>Retrieve the effect of autocompleting when there are multiple selections.. (Scintilla feature 2637)</summary>
        int AutoCGetMulti();

        /// <summary>Set the way autocompletion lists are ordered. (Scintilla feature 2660)</summary>
        void AutoCSetOrder(int order);

        /// <summary>Get the way autocompletion lists are ordered. (Scintilla feature 2661)</summary>
        int AutoCGetOrder();

        /// <summary>Enlarge the document to a particular size of text bytes. (Scintilla feature 2446)</summary>
        void Allocate(int bytes);

        /// <summary>
        /// Returns the target converted to UTF8.
        /// Return the length in bytes.
        /// (Scintilla feature 2447)
        /// </summary>
        unsafe string TargetAsUTF8();

        /// <summary>
        /// Set the length of the utf8 argument for calling EncodedFromUTF8.
        /// Set to -1 and the string will be measured to the first nul.
        /// (Scintilla feature 2448)
        /// </summary>
        void SetLengthForEncode(int bytes);

        /// <summary>
        /// Translates a UTF8 string into the document encoding.
        /// Return the length of the result in bytes.
        /// On error return 0.
        /// (Scintilla feature 2449)
        /// </summary>
        unsafe string EncodedFromUTF8(string utf8);

        /// <summary>
        /// Find the position of a column on a line taking into account tabs and
        /// multi-byte characters. If beyond end of line, return line end position.
        /// (Scintilla feature 2456)
        /// </summary>
        int FindColumn(int line, int column);

        /// <summary>Can the caret preferred x position only be changed by explicit movement commands? (Scintilla feature 2457)</summary>
        int GetCaretSticky();

        /// <summary>Stop the caret preferred x position changing when the user types. (Scintilla feature 2458)</summary>
        void SetCaretSticky(int useCaretStickyBehaviour);

        /// <summary>Switch between sticky and non-sticky: meant to be bound to a key. (Scintilla feature 2459)</summary>
        void ToggleCaretSticky();

        /// <summary>Enable/Disable convert-on-paste for line endings (Scintilla feature 2467)</summary>
        void SetPasteConvertEndings(bool convert);

        /// <summary>Get convert-on-paste setting (Scintilla feature 2468)</summary>
        bool GetPasteConvertEndings();

        /// <summary>Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature 2469)</summary>
        void SelectionDuplicate();

        /// <summary>Set background alpha of the caret line. (Scintilla feature 2470)</summary>
        void SetCaretLineBackAlpha(int alpha);

        /// <summary>Get the background alpha of the caret line. (Scintilla feature 2471)</summary>
        int GetCaretLineBackAlpha();

        /// <summary>Set the style of the caret to be drawn. (Scintilla feature 2512)</summary>
        void SetCaretStyle(int caretStyle);

        /// <summary>Returns the current style of the caret. (Scintilla feature 2513)</summary>
        int GetCaretStyle();

        /// <summary>Set the indicator used for IndicatorFillRange and IndicatorClearRange (Scintilla feature 2500)</summary>
        void SetIndicatorCurrent(int indicator);

        /// <summary>Get the current indicator (Scintilla feature 2501)</summary>
        int GetIndicatorCurrent();

        /// <summary>Set the value used for IndicatorFillRange (Scintilla feature 2502)</summary>
        void SetIndicatorValue(int value);

        /// <summary>Get the current indicator value (Scintilla feature 2503)</summary>
        int GetIndicatorValue();

        /// <summary>Turn a indicator on over a range. (Scintilla feature 2504)</summary>
        void IndicatorFillRange(int position, int fillLength);

        /// <summary>Turn a indicator off over a range. (Scintilla feature 2505)</summary>
        void IndicatorClearRange(int position, int clearLength);

        /// <summary>Are any indicators present at position? (Scintilla feature 2506)</summary>
        int IndicatorAllOnFor(int position);

        /// <summary>What value does a particular indicator have at at a position? (Scintilla feature 2507)</summary>
        int IndicatorValueAt(int indicator, int position);

        /// <summary>Where does a particular indicator start? (Scintilla feature 2508)</summary>
        int IndicatorStart(int indicator, int position);

        /// <summary>Where does a particular indicator end? (Scintilla feature 2509)</summary>
        int IndicatorEnd(int indicator, int position);

        /// <summary>Set number of entries in position cache (Scintilla feature 2514)</summary>
        void SetPositionCache(int size);

        /// <summary>How many entries are allocated to the position cache? (Scintilla feature 2515)</summary>
        int GetPositionCache();

        /// <summary>Copy the selection, if selection empty copy the line with the caret (Scintilla feature 2519)</summary>
        void CopyAllowLine();

        /// <summary>
        /// Compact the document buffer and return a read-only pointer to the
        /// characters in the document.
        /// (Scintilla feature 2520)
        /// </summary>
        IntPtr GetCharacterPointer();

        /// <summary>
        /// Return a read-only pointer to a range of characters in the document.
        /// May move the gap so that the range is contiguous, but will only move up
        /// to rangeLength bytes.
        /// (Scintilla feature 2643)
        /// </summary>
        IntPtr GetRangePointer(int position, int rangeLength);

        /// <summary>
        /// Return a position which, to avoid performance costs, should not be within
        /// the range of a call to GetRangePointer.
        /// (Scintilla feature 2644)
        /// </summary>
        Position GetGapPosition();

        /// <summary>Set the alpha fill colour of the given indicator. (Scintilla feature 2523)</summary>
        void IndicSetAlpha(int indicator, int alpha);

        /// <summary>Get the alpha fill colour of the given indicator. (Scintilla feature 2524)</summary>
        int IndicGetAlpha(int indicator);

        /// <summary>Set the alpha outline colour of the given indicator. (Scintilla feature 2558)</summary>
        void IndicSetOutlineAlpha(int indicator, int alpha);

        /// <summary>Get the alpha outline colour of the given indicator. (Scintilla feature 2559)</summary>
        int IndicGetOutlineAlpha(int indicator);

        /// <summary>Set extra ascent for each line (Scintilla feature 2525)</summary>
        void SetExtraAscent(int extraAscent);

        /// <summary>Get extra ascent for each line (Scintilla feature 2526)</summary>
        int GetExtraAscent();

        /// <summary>Set extra descent for each line (Scintilla feature 2527)</summary>
        void SetExtraDescent(int extraDescent);

        /// <summary>Get extra descent for each line (Scintilla feature 2528)</summary>
        int GetExtraDescent();

        /// <summary>Which symbol was defined for markerNumber with MarkerDefine (Scintilla feature 2529)</summary>
        int MarkerSymbolDefined(int markerNumber);

        /// <summary>Set the text in the text margin for a line (Scintilla feature 2530)</summary>
        unsafe void MarginSetText(int line, string text);

        /// <summary>Get the text in the text margin for a line (Scintilla feature 2531)</summary>
        unsafe string MarginGetText(int line);

        /// <summary>Set the style number for the text margin for a line (Scintilla feature 2532)</summary>
        void MarginSetStyle(int line, int style);

        /// <summary>Get the style number for the text margin for a line (Scintilla feature 2533)</summary>
        int MarginGetStyle(int line);

        /// <summary>Set the style in the text margin for a line (Scintilla feature 2534)</summary>
        unsafe void MarginSetStyles(int line, string styles);

        /// <summary>Get the styles in the text margin for a line (Scintilla feature 2535)</summary>
        unsafe string MarginGetStyles(int line);

        /// <summary>Clear the margin text on all lines (Scintilla feature 2536)</summary>
        void MarginTextClearAll();

        /// <summary>Get the start of the range of style numbers used for margin text (Scintilla feature 2537)</summary>
        void MarginSetStyleOffset(int style);

        /// <summary>Get the start of the range of style numbers used for margin text (Scintilla feature 2538)</summary>
        int MarginGetStyleOffset();

        /// <summary>Set the margin options. (Scintilla feature 2539)</summary>
        void SetMarginOptions(int marginOptions);

        /// <summary>Get the margin options. (Scintilla feature 2557)</summary>
        int GetMarginOptions();

        /// <summary>Set the annotation text for a line (Scintilla feature 2540)</summary>
        unsafe void AnnotationSetText(int line, string text);

        /// <summary>Get the annotation text for a line (Scintilla feature 2541)</summary>
        unsafe string AnnotationGetText(int line);

        /// <summary>Set the style number for the annotations for a line (Scintilla feature 2542)</summary>
        void AnnotationSetStyle(int line, int style);

        /// <summary>Get the style number for the annotations for a line (Scintilla feature 2543)</summary>
        int AnnotationGetStyle(int line);

        /// <summary>Set the annotation styles for a line (Scintilla feature 2544)</summary>
        unsafe void AnnotationSetStyles(int line, string styles);

        /// <summary>Get the annotation styles for a line (Scintilla feature 2545)</summary>
        unsafe string AnnotationGetStyles(int line);

        /// <summary>Get the number of annotation lines for a line (Scintilla feature 2546)</summary>
        int AnnotationGetLines(int line);

        /// <summary>Clear the annotations from all lines (Scintilla feature 2547)</summary>
        void AnnotationClearAll();

        /// <summary>Set the visibility for the annotations for a view (Scintilla feature 2548)</summary>
        void AnnotationSetVisible(int visible);

        /// <summary>Get the visibility for the annotations for a view (Scintilla feature 2549)</summary>
        int AnnotationGetVisible();

        /// <summary>Get the start of the range of style numbers used for annotations (Scintilla feature 2550)</summary>
        void AnnotationSetStyleOffset(int style);

        /// <summary>Get the start of the range of style numbers used for annotations (Scintilla feature 2551)</summary>
        int AnnotationGetStyleOffset();

        /// <summary>Release all extended (>255) style numbers (Scintilla feature 2552)</summary>
        void ReleaseAllExtendedStyles();

        /// <summary>Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature 2553)</summary>
        int AllocateExtendedStyles(int numberStyles);

        /// <summary>Add a container action to the undo stack (Scintilla feature 2560)</summary>
        void AddUndoAction(int token, int flags);

        /// <summary>Find the position of a character from a point within the window. (Scintilla feature 2561)</summary>
        Position CharPositionFromPoint(int x, int y);

        /// <summary>
        /// Find the position of a character from a point within the window.
        /// Return INVALID_POSITION if not close to text.
        /// (Scintilla feature 2562)
        /// </summary>
        Position CharPositionFromPointClose(int x, int y);

        /// <summary>Set whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2668)</summary>
        void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch);

        /// <summary>Whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2669)</summary>
        bool GetMouseSelectionRectangularSwitch();

        /// <summary>Set whether multiple selections can be made (Scintilla feature 2563)</summary>
        void SetMultipleSelection(bool multipleSelection);

        /// <summary>Whether multiple selections can be made (Scintilla feature 2564)</summary>
        bool GetMultipleSelection();

        /// <summary>Set whether typing can be performed into multiple selections (Scintilla feature 2565)</summary>
        void SetAdditionalSelectionTyping(bool additionalSelectionTyping);

        /// <summary>Whether typing can be performed into multiple selections (Scintilla feature 2566)</summary>
        bool GetAdditionalSelectionTyping();

        /// <summary>Set whether additional carets will blink (Scintilla feature 2567)</summary>
        void SetAdditionalCaretsBlink(bool additionalCaretsBlink);

        /// <summary>Whether additional carets will blink (Scintilla feature 2568)</summary>
        bool GetAdditionalCaretsBlink();

        /// <summary>Set whether additional carets are visible (Scintilla feature 2608)</summary>
        void SetAdditionalCaretsVisible(bool additionalCaretsBlink);

        /// <summary>Whether additional carets are visible (Scintilla feature 2609)</summary>
        bool GetAdditionalCaretsVisible();

        /// <summary>How many selections are there? (Scintilla feature 2570)</summary>
        int GetSelections();

        /// <summary>Is every selected range empty? (Scintilla feature 2650)</summary>
        bool GetSelectionEmpty();

        /// <summary>Clear selections to a single empty stream selection (Scintilla feature 2571)</summary>
        void ClearSelections();

        /// <summary>Set a simple selection (Scintilla feature 2572)</summary>
        int SetSelection(int caret, int anchor);

        /// <summary>Add a selection (Scintilla feature 2573)</summary>
        int AddSelection(int caret, int anchor);

        /// <summary>Drop one selection (Scintilla feature 2671)</summary>
        void DropSelectionN(int selection);

        /// <summary>Set the main selection (Scintilla feature 2574)</summary>
        void SetMainSelection(int selection);

        /// <summary>Which selection is the main selection (Scintilla feature 2575)</summary>
        int GetMainSelection();

        /// <summary>Which selection is the main selection (Scintilla feature 2576)</summary>
        void SetSelectionNCaret(int selection, Position pos);

        /// <summary>Which selection is the main selection (Scintilla feature 2577)</summary>
        Position GetSelectionNCaret(int selection);

        /// <summary>Which selection is the main selection (Scintilla feature 2578)</summary>
        void SetSelectionNAnchor(int selection, Position posAnchor);

        /// <summary>Which selection is the main selection (Scintilla feature 2579)</summary>
        Position GetSelectionNAnchor(int selection);

        /// <summary>Which selection is the main selection (Scintilla feature 2580)</summary>
        void SetSelectionNCaretVirtualSpace(int selection, int space);

        /// <summary>Which selection is the main selection (Scintilla feature 2581)</summary>
        int GetSelectionNCaretVirtualSpace(int selection);

        /// <summary>Which selection is the main selection (Scintilla feature 2582)</summary>
        void SetSelectionNAnchorVirtualSpace(int selection, int space);

        /// <summary>Which selection is the main selection (Scintilla feature 2583)</summary>
        int GetSelectionNAnchorVirtualSpace(int selection);

        /// <summary>Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2584)</summary>
        void SetSelectionNStart(int selection, Position pos);

        /// <summary>Returns the position at the start of the selection. (Scintilla feature 2585)</summary>
        Position GetSelectionNStart(int selection);

        /// <summary>Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2586)</summary>
        void SetSelectionNEnd(int selection, Position pos);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2587)</summary>
        Position GetSelectionNEnd(int selection);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2588)</summary>
        void SetRectangularSelectionCaret(Position pos);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2589)</summary>
        Position GetRectangularSelectionCaret();

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2590)</summary>
        void SetRectangularSelectionAnchor(Position posAnchor);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2591)</summary>
        Position GetRectangularSelectionAnchor();

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2592)</summary>
        void SetRectangularSelectionCaretVirtualSpace(int space);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2593)</summary>
        int GetRectangularSelectionCaretVirtualSpace();

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2594)</summary>
        void SetRectangularSelectionAnchorVirtualSpace(int space);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2595)</summary>
        int GetRectangularSelectionAnchorVirtualSpace();

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2596)</summary>
        void SetVirtualSpaceOptions(int virtualSpaceOptions);

        /// <summary>Returns the position at the end of the selection. (Scintilla feature 2597)</summary>
        int GetVirtualSpaceOptions();

        /// <summary>
        /// On GTK+, allow selecting the modifier key to use for mouse-based
        /// rectangular selection. Often the window manager requires Alt+Mouse Drag
        /// for moving windows.
        /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER.
        /// (Scintilla feature 2598)
        /// </summary>
        void SetRectangularSelectionModifier(int modifier);

        /// <summary>Get the modifier key used for rectangular selection. (Scintilla feature 2599)</summary>
        int GetRectangularSelectionModifier();

        /// <summary>
        /// Set the foreground colour of additional selections.
        /// Must have previously called SetSelFore with non-zero first argument for this to have an effect.
        /// (Scintilla feature 2600)
        /// </summary>
        void SetAdditionalSelFore(Colour fore);

        /// <summary>
        /// Set the background colour of additional selections.
        /// Must have previously called SetSelBack with non-zero first argument for this to have an effect.
        /// (Scintilla feature 2601)
        /// </summary>
        void SetAdditionalSelBack(Colour back);

        /// <summary>Set the alpha of the selection. (Scintilla feature 2602)</summary>
        void SetAdditionalSelAlpha(int alpha);

        /// <summary>Get the alpha of the selection. (Scintilla feature 2603)</summary>
        int GetAdditionalSelAlpha();

        /// <summary>Set the foreground colour of additional carets. (Scintilla feature 2604)</summary>
        void SetAdditionalCaretFore(Colour fore);

        /// <summary>Get the foreground colour of additional carets. (Scintilla feature 2605)</summary>
        Colour GetAdditionalCaretFore();

        /// <summary>Set the main selection to the next selection. (Scintilla feature 2606)</summary>
        void RotateSelection();

        /// <summary>Swap that caret and anchor of the main selection. (Scintilla feature 2607)</summary>
        void SwapMainAnchorCaret();

        /// <summary>
        /// Indicate that the internal state of a lexer has changed over a range and therefore
        /// there may be a need to redraw.
        /// (Scintilla feature 2617)
        /// </summary>
        int ChangeLexerState(Position start, Position end);

        /// <summary>
        /// Find the next line at or after lineStart that is a contracted fold header line.
        /// Return -1 when no more lines.
        /// (Scintilla feature 2618)
        /// </summary>
        int ContractedFoldNext(int lineStart);

        /// <summary>Centre current line in window. (Scintilla feature 2619)</summary>
        void VerticalCentreCaret();

        /// <summary>Move the selected lines up one line, shifting the line above after the selection (Scintilla feature 2620)</summary>
        void MoveSelectedLinesUp();

        /// <summary>Move the selected lines down one line, shifting the line below before the selection (Scintilla feature 2621)</summary>
        void MoveSelectedLinesDown();

        /// <summary>Set the identifier reported as IdFrom in notification messages. (Scintilla feature 2622)</summary>
        void SetIdentifier(int identifier);

        /// <summary>Get the identifier. (Scintilla feature 2623)</summary>
        int GetIdentifier();

        /// <summary>Set the width for future RGBA image data. (Scintilla feature 2624)</summary>
        void RGBAImageSetWidth(int width);

        /// <summary>Set the height for future RGBA image data. (Scintilla feature 2625)</summary>
        void RGBAImageSetHeight(int height);

        /// <summary>Set the scale factor in percent for future RGBA image data. (Scintilla feature 2651)</summary>
        void RGBAImageSetScale(int scalePercent);

        /// <summary>
        /// Define a marker from RGBA data.
        /// It has the width and height from RGBAImageSetWidth/Height
        /// (Scintilla feature 2626)
        /// </summary>
        unsafe void MarkerDefineRGBAImage(int markerNumber, string pixels);

        /// <summary>
        /// Register an RGBA image for use in autocompletion lists.
        /// It has the width and height from RGBAImageSetWidth/Height
        /// (Scintilla feature 2627)
        /// </summary>
        unsafe void RegisterRGBAImage(int type, string pixels);

        /// <summary>Scroll to start of document. (Scintilla feature 2628)</summary>
        void ScrollToStart();

        /// <summary>Scroll to end of document. (Scintilla feature 2629)</summary>
        void ScrollToEnd();

        /// <summary>Set the technology used. (Scintilla feature 2630)</summary>
        void SetTechnology(int technology);

        /// <summary>Get the tech. (Scintilla feature 2631)</summary>
        int GetTechnology();

        /// <summary>Create an ILoader*. (Scintilla feature 2632)</summary>
        int CreateLoader(int bytes);

        /// <summary>On OS X, show a find indicator. (Scintilla feature 2640)</summary>
        void FindIndicatorShow(Position start, Position end);

        /// <summary>On OS X, flash a find indicator, then fade out. (Scintilla feature 2641)</summary>
        void FindIndicatorFlash(Position start, Position end);

        /// <summary>On OS X, hide the find indicator. (Scintilla feature 2642)</summary>
        void FindIndicatorHide();

        /// <summary>
        /// Move caret to before first visible character on display line.
        /// If already there move to first character on display line.
        /// (Scintilla feature 2652)
        /// </summary>
        void VCHomeDisplay();

        /// <summary>Like VCHomeDisplay but extending selection to new caret position. (Scintilla feature 2653)</summary>
        void VCHomeDisplayExtend();

        /// <summary>Is the caret line always visible? (Scintilla feature 2654)</summary>
        bool GetCaretLineVisibleAlways();

        /// <summary>Sets the caret line to always visible. (Scintilla feature 2655)</summary>
        void SetCaretLineVisibleAlways(bool alwaysVisible);

        /// <summary>Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. (Scintilla feature 2656)</summary>
        void SetLineEndTypesAllowed(int lineEndBitSet);

        /// <summary>Get the line end types currently allowed. (Scintilla feature 2657)</summary>
        int GetLineEndTypesAllowed();

        /// <summary>Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. (Scintilla feature 2658)</summary>
        int GetLineEndTypesActive();

        /// <summary>Set the way a character is drawn. (Scintilla feature 2665)</summary>
        unsafe void SetRepresentation(string encodedCharacter, string representation);

        /// <summary>
        /// Set the way a character is drawn.
        /// Result is NUL-terminated.
        /// (Scintilla feature 2666)
        /// </summary>
        unsafe string GetRepresentation(string encodedCharacter);

        /// <summary>Remove a character representation. (Scintilla feature 2667)</summary>
        unsafe void ClearRepresentation(string encodedCharacter);

        /// <summary>Start notifying the container of all key presses and commands. (Scintilla feature 3001)</summary>
        void StartRecord();

        /// <summary>Stop notifying the container of all key presses and commands. (Scintilla feature 3002)</summary>
        void StopRecord();

        /// <summary>Set the lexing language of the document. (Scintilla feature 4001)</summary>
        void SetLexer(int lexer);

        /// <summary>Retrieve the lexing language of the document. (Scintilla feature 4002)</summary>
        int GetLexer();

        /// <summary>Colourise a segment of the document using the current lexing language. (Scintilla feature 4003)</summary>
        void Colourise(Position start, Position end);

        /// <summary>Set up a value that may be used by a lexer for some optional feature. (Scintilla feature 4004)</summary>
        unsafe void SetProperty(string key, string value);

        /// <summary>Set up the key words used by the lexer. (Scintilla feature 4005)</summary>
        unsafe void SetKeyWords(int keywordSet, string keyWords);

        /// <summary>Set the lexing language of the document based on string name. (Scintilla feature 4006)</summary>
        unsafe void SetLexerLanguage(string language);

        /// <summary>Load a lexer library (dll / so). (Scintilla feature 4007)</summary>
        unsafe void LoadLexerLibrary(string path);

        /// <summary>
        /// Retrieve a "property" value previously set with SetProperty.
        /// Result is NUL-terminated.
        /// (Scintilla feature 4008)
        /// </summary>
        unsafe string GetProperty(string key);

        /// <summary>
        /// Retrieve a "property" value previously set with SetProperty,
        /// with "$()" variable replacement on returned buffer.
        /// Result is NUL-terminated.
        /// (Scintilla feature 4009)
        /// </summary>
        unsafe string GetPropertyExpanded(string key);

        /// <summary>
        /// Retrieve a "property" value previously set with SetProperty,
        /// interpreted as an int AFTER any "$()" variable replacement.
        /// (Scintilla feature 4010)
        /// </summary>
        unsafe int GetPropertyInt(string key);

        /// <summary>Retrieve the number of bits the current lexer needs for styling. (Scintilla feature 4011)</summary>
        int GetStyleBitsNeeded();

        /// <summary>
        /// Retrieve the name of the lexer.
        /// Return the length of the text.
        /// Result is NUL-terminated.
        /// (Scintilla feature 4012)
        /// </summary>
        unsafe string GetLexerLanguage();

        /// <summary>For private communication between an application and a known lexer. (Scintilla feature 4013)</summary>
        int PrivateLexerCall(int operation, int pointer);

        /// <summary>
        /// Retrieve a '\n' separated list of properties understood by the current lexer.
        /// Result is NUL-terminated.
        /// (Scintilla feature 4014)
        /// </summary>
        unsafe string PropertyNames();

        /// <summary>Retrieve the type of a property. (Scintilla feature 4015)</summary>
        unsafe int PropertyType(string name);

        /// <summary>
        /// Describe a property.
        /// Result is NUL-terminated.
        /// (Scintilla feature 4016)
        /// </summary>
        unsafe string DescribeProperty(string name);

        /// <summary>
        /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
        /// Result is NUL-terminated.
        /// (Scintilla feature 4017)
        /// </summary>
        unsafe string DescribeKeyWordSets();

        /// <summary>
        /// Bit set of LineEndType enumertion for which line ends beyond the standard
        /// LF, CR, and CRLF are supported by the lexer.
        /// (Scintilla feature 4018)
        /// </summary>
        int GetLineEndTypesSupported();

        /// <summary>Allocate a set of sub styles for a particular base style, returning start of range (Scintilla feature 4020)</summary>
        int AllocateSubStyles(int styleBase, int numberStyles);

        /// <summary>The starting style number for the sub styles associated with a base style (Scintilla feature 4021)</summary>
        int GetSubStylesStart(int styleBase);

        /// <summary>The number of sub styles associated with a base style (Scintilla feature 4022)</summary>
        int GetSubStylesLength(int styleBase);

        /// <summary>For a sub style, return the base style, else return the argument. (Scintilla feature 4027)</summary>
        int GetStyleFromSubStyle(int subStyle);

        /// <summary>For a secondary style, return the primary style, else return the argument. (Scintilla feature 4028)</summary>
        int GetPrimaryStyleFromStyle(int style);

        /// <summary>Free allocated sub styles (Scintilla feature 4023)</summary>
        void FreeSubStyles();

        /// <summary>Set the identifiers that are shown in a particular style (Scintilla feature 4024)</summary>
        unsafe void SetIdentifiers(int style, string identifiers);

        /// <summary>
        /// Where styles are duplicated by a feature such as active/inactive code
        /// return the distance between the two types.
        /// (Scintilla feature 4025)
        /// </summary>
        int DistanceToSecondaryStyles();

        /// <summary>
        /// Get the set of base styles that can be extended with sub styles
        /// Result is NUL-terminated.
        /// (Scintilla feature 4026)
        /// </summary>
        unsafe string GetSubStyleBases();

        /// <summary>
        /// Deprecated in 2.30
        /// In palette mode?
        /// (Scintilla feature 2139)
        /// </summary>
        bool GetUsePalette();

        /// <summary>
        /// In palette mode, Scintilla uses the environment's palette calls to display
        /// more colours. This may lead to ugly displays.
        /// (Scintilla feature 2039)
        /// </summary>
        void SetUsePalette(bool usePalette);

        /// <summary>
        /// Deprecated in 3.5.5
        /// Always interpret keyboard input as Unicode
        /// (Scintilla feature 2521)
        /// </summary>
        void SetKeysUnicode(bool keysUnicode);

        /// <summary>Are keys always interpreted as Unicode? (Scintilla feature 2522)</summary>
        bool GetKeysUnicode();

        /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
    }
}
